import { server } from "../utils/request";

export function login(data){
	return server({
		url:"/user/residentLogin",
	    method:"post",
        data:{
            phoneNum: data.phoneNum,
            password: data.password
        }
    })
}

export function sendCode(phoneNum){
    return server({
        url:`/code/sendCode/${phoneNum}`,
        method:"post"
    })
}

export function register(data){
    return server({
        url:"/user/registerResident",
        method:"post",
        data
    })
}

export function updatePassword(data){
    return server({
        url:"/user/updatePassword",
        method:"post",
        data
    })
}